function showFeedback() {
	mask.open(true);
	ajaxGet(website + "boFeedback/show", null, function(result) {
		var tabOrder = $("#currentTabOrder").val();
		$("#tabs-"+tabOrder).html(result);
		initFeedback();
		mask.close();
	}, "html");
}

function initFeedback() {
	$("#delete-feedback").button().click(function() {
		openDeleteDialog(FEEDBACK,"checkKey");
	});
	$("#query-feedback").button().click(function() {
		search();
	});
}

function processFeedback(obj){
	var params = {
		fbid : $(obj).attr("fbid")
	}
	mask.open(true);
	ajaxGet(website+"boFeedback/process",params,function(result){
		$("#process-" + $(obj).attr("fbid")).html(result);
		$(obj).html("");
		mask.close();
	},"html");
}


function search(){
	searchWithPage();
}

function getPage(pageIndex){
	searchWithPage(pageIndex);
}

function searchWithPage(pageIndex){
	var type = $("#type").val();
	var process = $("#process").val();
	var startDate = $("#from").val();
	var endDate = $("#to").val();
	var params = null;
	if(pageIndex != null){
		params = {
			type:type,
			process:process,
			startdate:startDate,
			enddate:endDate,
			page:pageIndex
		}
	}else{
		params = {
			type:type,
			process:process,
			startdate:startDate,
			enddate:endDate,
		}
	}
	mask.open(true);
	ajaxGet(website + "boFeedback/search",params,function(result){
		var tabOrder = $("#currentTabOrder").val();
		$("#tabs-"+tabOrder).html(result);
		initFeedback();
		mask.close();
	},"html");
}